package com.cn.xml;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;


public class AspectXml {

    public void before(JoinPoint point) {
        System.out.println("前置通知" + point.getTarget() + "的" + point.getSignature().getName() + "开始执行了");
    }

    public void afterReturning(JoinPoint point,Object result) {
        System.out.println("后置返回通知"+result);
    }

    public Object around(ProceedingJoinPoint point) throws Throwable {
        System.out.println("环绕开始");
        Object proceed = point.proceed();
        System.out.println("环绕结束");
        return proceed;
    }

    public void except(Throwable e) {
        System.out.println("异常通知" + e.getMessage());
    }

    public void after() {
        System.out.println("后置通知");
    }
}
